import request from '@/utils/request'

// 查询费用规则列表
export function listCostRules(query) {
  return request({
    url: '/cost/costRules/list',
    method: 'get',
    params: query
  })
}

// 查询费用规则详细
export function getCostRules(id) {
  return request({
    url: '/cost/costRules/' + id,
    method: 'get'
  })
}

// 新增费用规则
export function addCostRules(data) {
  return request({
    url: '/cost/costRules',
    method: 'post',
    data: data
  })
}

// 修改费用规则
export function updateCostRules(data) {
  return request({
    url: '/cost/costRules',
    method: 'put',
    data: data
  })
}
// 修改费用规则
export function updateCostDefault(data) {
  return request({
    url: '/cost/costRules/default',
    method: 'post',
    data: data
  })
}

// 删除费用规则
export function delCostRules(id) {
  return request({
    url: '/cost/costRules/' + id,
    method: 'delete'
  })
}

// 导出费用规则
export function exportCostRules(query) {
  return request({
    url: '/cost/costRules/export',
    method: 'get',
    params: query
  })
}